Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mock DbErr #1241

Merged
merged 2 commits into from
Nov 24, 2022
Merged

Mock DbErr #1241

merged 2 commits into from
Nov 24, 2022

Conversation

tyt2y3
Copy link
Member

@tyt2y3 tyt2y3 commented Nov 22, 2022

Resolves #1235

@@ -116,4 +116,4 @@ runtime-tokio-rustls = [
"sea-query-binder?/runtime-tokio-rustls",
"runtime-tokio",
]
tests-cfg = []
tests-cfg = ["serde/derive"]
Copy link
Member Author

@tyt2y3 tyt2y3 Nov 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed for

cargo test --lib --features=tests-cfg,with-json -- mock

@tyt2y3 tyt2y3 changed the title Mock err Mock DbErr Nov 22, 2022
@tyt2y3
Copy link
Member Author

tyt2y3 commented Nov 23, 2022

@robot-head does this work for you?

@robot-head
Copy link

Looks good to me! Great job, thank you

Copy link
Member

@billy1624 billy1624 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What a smart way to avoid breaking existing public API :)

@robot-head
Copy link

What a smart way to avoid breaking existing public API :)

Yeah honestly impressed, a much better solution than I proposed, learning here!

@tyt2y3 tyt2y3 merged commit ca403da into master Nov 24, 2022
@tyt2y3 tyt2y3 deleted the mock-err branch November 24, 2022 05:42
tyt2y3 added a commit that referenced this pull request Nov 24, 2022
* Mock Err

* Test mock errors
@tyt2y3
Copy link
Member Author

tyt2y3 commented Nov 24, 2022

Feeling flattered.

https://github.com/SeaQL/sea-orm/releases/tag/0.10.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support configuring MockDatabase to return DbError on all types of operations against it.
3 participants